﻿	@model KpBusiness.Model.CandidateSearch

@{
	ViewBag.Title = "Index";
}

<h2>Search</h2>
<div>
@using (Html.BeginForm()) {
	@Html.ValidationSummary(true)
		<div class="editor-label">
			@Html.LabelFor(model => model.SearchCandidate.Fname)
		</div>
		<div class="editor-field">
			@Html.TextBoxFor(model => model.SearchCandidate.Fname)<br />
			
		</div>

		 <div class="editor-label">
			@Html.LabelFor(model => model.SearchCandidate.Mobile)
		</div>
		<div class="editor-field">
			@Html.TextBoxFor(model => model.SearchCandidate.Mobile)<br />
			
		</div>


		<div class="editor-label">
			@Html.LabelFor(model => model.SearchCandidate.CurrentLocation)
		</div>
		<div class="editor-field">
			@Html.TextBoxFor(model => model.SearchCandidate.CurrentLocation)<br />
			
		</div>

		 <div class="editor-label">
			@Html.LabelFor(model => model.ExpFrom)
		</div>
		<div class="editor-field">
			@Html.TextBoxFor(model => model.ExpFrom)<br />
		</div>


		 <div class="editor-label">
			@Html.LabelFor(model => model.ExpTo)
		</div>
		<div class="editor-field">
			@Html.TextBoxFor(model => model.ExpTo)<br />
		</div>



		<div class="editor-label">
			@Html.LabelFor(model => model.SearchCandidate.Skills)
		</div>
		<div class="editor-field">
			@Html.TextBoxFor(model => model.SearchCandidate.Skills)<br />
		</div>

		<div class="editor-label">
			@Html.LabelFor(model => model.SearchCandidate.CurrentCtc)
		</div>
		<div class="editor-field">
			@Html.TextBoxFor(model => model.SearchCandidate.CurrentCtc)<br />
		</div>

		<div class="editor-label">
			@Html.LabelFor(model => model.SearchCandidate.ExpectedCtc)
		</div>
		<div class="editor-field">
			@Html.TextBoxFor(model => model.SearchCandidate.ExpectedCtc)<br />
		</div>

		
		<div class="editor-label">
			@Html.LabelFor(model => model.AgeFrom)
		</div>
		<div class="editor-field">
			@Html.TextBoxFor(model => model.AgeFrom)<br />
		</div>

		
		<div class="editor-label">
			@Html.LabelFor(model => model.AgeTo)
		</div>
		<div class="editor-field">
			@Html.TextBoxFor(model => model.AgeTo)<br />
		</div>


		   <div class="editor-label">
			@Html.LabelFor(model => model.SearchCandidate.IsResumeUploaded)
		</div>
		<div class="editor-field">
			@Html.CheckBoxFor(model => model.SearchCandidate.IsResumeUploaded)<br />
		</div>

			<div class="editor-label">
			@Html.LabelFor(model => model.SearchCandidate.IsHrResumeUploaded)
		</div>
		<div class="editor-field">
			@Html.CheckBoxFor(model => model.SearchCandidate.IsHrResumeUploaded)<br />
		</div>


		   <div class="editor-label">
			@Html.LabelFor(model => model.SearchCandidate.IsResumeUploaded)
		</div>
		<div class="editor-field">
			@Html.CheckBoxFor(model => model.SearchCandidate.IsResumeUploaded)<br />
		</div>
	
	 <input type="submit" value="Search" />
}
</div>


<p>


	@Html.ActionLink("Create New", "Create")
</p>
<table>
	<tr>
		<th>Name</th>
		<th>Experience</th>
		<th>Current Salary</th>
		<th>Location</th>
        <th>Action</th>
	</tr>
	@if (Model != null && Model.SearchResult != null)
	{
	
		foreach (var item in Model.SearchResult)
		{
			<tr>
				<td> @Html.DisplayFor(modelItem => item.Fname) @Html.DisplayFor(modelItem => item.Lname)</td>
				<td> @Html.DisplayFor(modelItem => item.YearsOfExp)</td>
                <td> @Html.DisplayFor(modelItem => item.CurrentCtc)</td>
                <td> @Html.DisplayFor(modelItem => item.CurrentLocation)</td>
                <td>
                @Html.ActionLink("Edit", "Edit", new { id=item.UserInformation.UserId}) |
                @Html.ActionLink("Details", "Details", new { id = item.UserInformation.UserId }) |
                @Html.ActionLink("Resume", "UploadCandidateResume", new { id = item.UserInformation.UserId }) |
                @Html.ActionLink("Hr Resume", "HrResumeUpload", new { id = item.UserInformation.UserId }) |
                @Html.ActionLink("Offer Letter", "OfferLetterUpload", new { id = item.UserInformation.UserId }) 
                </td>

			</tr>
		}

	}
</table>
